import request from '@/common/request/request.js'
import {
	stringFormat,
	toQueryString
} from '../utils/util.js' //组件用正则 过滤传递的参数

const GET = 'GET'
const POST = 'POST'
const PUT = 'PUT'
const DELETE = 'DELETE'

export function isNotUserAddress(data) {
	return request(data, "/merchandise/report/isNotUserAddress", GET).then(res => res)
}
export function showExaminationConfig(data) {
	return request(data, "/scl/showExaminationConfig", GET).then(res => res)
}

export function chakraSclInfo(data) {
	return request(data, "/merchandise/chakraSclInfo", GET).then(res => res)
}

export function updateSclBuyNum(data) {
	return request(data, "/scl/updateSclBuyNum", GET).then(res => res)
}

/**
 * @Description:
 * 普通测评支付
 * @gavin
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-09-19
 */
export function get_transaction_list(data) {
	return request(data, "/customer/transaction/get_transaction_list", GET).then(res => res)
}

/**
 * @Description:
 * 普通测评支付
 * @gavin
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-09-19
 */
export function orderPay(data) {
	return request(data, "/order/orderPay", POST).then(res => res)
}
/**
 * @Description:
 * 获取测评详情
 * @gavin
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-09-19
 */
export function get_more_scl_list(data) {
	return request(data, "/scl/get_more_scl_list", GET).then(res => res)
}
/**
 * @Description:
 * 获取测评详情
 * @gavin
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-08-31 13:16:56
 */
export function get_recommend_scl_list(data) {
	return request(data, "/scl/get_recommend_scl_list", GET).then(res => res)
}
/**
 * @Description:
 * 获取测评详情
 * @gavin
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-08-31 13:16:56
 */
export function get_scl_info(data) {
	return request(data, "/scl/get_scl_info", GET).then(res => res)
}

/**
 * @Description:
 * 历史测评列表
 * @gavin
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-08-31 13:16:56
 */
export function ceping_data_list(data) {
	return request(data, "/scl/ceping_list"+ toQueryString(data), POST).then(res => res)
}
/**
 * @Description:
 * 展示测评结果
 * @gavin
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-08-31 13:16:56
 */
export function resultShow(data) {
	return request(data, "/scl/resultShow" + toQueryString(data), POST).then(res => res)
}

/**
 * @Description:
 * 获取题目详情
 * @gavin
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-08-31 13:16:56
 */
export function qstnShow(data) {
	return request(data, "/scl/qstnShow" + toQueryString(data), POST).then(res => res)
}
/**
 * @Description:
 * 获取题目详情
 * @gavin
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-08-31 13:16:56
 */
export function userWebAnswer(data) {
	return request(data, "/scl/userWebAnswer", POST).then(res => res)
}


/**
 * @Description:
 * 获取初始测评内容
 * @gaotian
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-10-24 10:56
 */
export function getInitialAppraisalInfo(data) {
	return request(data, "/scl/getInitialAppraisalInfo", GET).then(res => res)
}

/**
 * @Description:
 * 提交初始测评答案
 * @gaotian
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-10-24 10:56
 */
export function addInitialAppraisal(data) {
	return request(data, "/scl/addInitialAppraisal", POST).then(res => res)
}


/**
 * @Description:
 * 购买测评会员
 * @gaotian
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-10-26 10:56
 */
export function wxPayMember(data) {
	return request(data, "/member/wxPayMember", GET).then(res => res)
}


export function getSclBannerList(data) {
	return request(data, "/banner/list", GET).then(res => res)
}




/**
 * @Description:
 * 购买测评会员
 * @gaotian
 * 
 * @param 
 * @return 
 * 
 * @createTime: 2023-10-26 10:56
 */
export function getClosePsychologicalUrl(data) {
  return request(data, "/scl/getClosePsychologicalUrl", GET).then(res => res)
}



export function isEshopScl(data) {
	return request(data, "/scl/isEshopScl", GET).then(res => res)
}


// 获取前台入口开关项
export function getDynamicSettings(data) {
	return request(data, "/scl/getDynamicSettings", GET).then(res => res)
}

export function updateSclTalkTime(data) {
	return request(data, "/updateSclTalkTime", GET).then(res => res)
}



// 获取用户未做的测评信息
export function getSclNotCompleteInfo(data) {
  return request(data, "/scl/getPopupWindow", GET).then(res => res)
}



// 获取随机推荐测评
export function getMoreSclInfo(data) {
  return request(data, "/scl/getMoreSclInfo", GET).then(res => res)
}


export function getSclMenus(data) {
  return request(data, "/label/labelSubject", GET).then(res => res)
}




export function checkUserIsPayScl(data) {
  return request(data, "/scl/userIsPayScl", GET).then(res => res)
}



export function getUserAnsList(data) {
  // return request(data, "/scl/userAnsList", GET).then(res => res)
  return request(data, "/scl/userAnsList", GET).then(res => res)
}


export function checkEshopDiscountCount(data) {
  return request(data, "/discountUseBind/eshopDiscountCount", GET).then(res => res)
}



export function getRecommendScl(data) {
  return request(data, "/scl/firstRecommendScl", GET).then(res => res)
}



export function getResultPageRecommendScl(data) {
  return request(data, "/scl/get_recommend_scl_list", GET).then(res => res)
}


export function saveOptnSubjectivity(data) {
	return request(data, "/scl/saveOptnSubjectivity", POST).then(res => res)
}


export function showExplanation(data) {
	return request(data, "/scl/unscrambleConfig", GET).then(res => res)
}

export function memberGoodsList(data) {
	return request(data, "/virtualGoods/memberGoodsList", GET).then(res => res)
}

export function sclExaminationEshopReport(data) {
	return request(data, "/scl/examination/depression/sclExaminationEshopReport", GET).then(res => res)
}
